using TerritoryGame.Domain.Entities.App;
using TerritoryGame.Application.Dtos;

namespace TerritoryGame.Application.Interfaces
{
    public interface IAppGameService
    {
        Task<GameRoom> CreateRoomAsync(string roomName, int maxPlayers, int gameDuration, Player creator);
        Task<GameRoom?> GetRoomAsync(string roomId);
        Task<bool> JoinRoomAsync(string roomId, Player player);
        Task<bool> LeaveRoomAsync(string roomId, string playerId);
        Task<bool> StartGameAsync(string roomId);
        Task<bool> SetRoomReadyAsync(string roomId);
        Task<bool> EndGameAsync(string roomId);
        Task<PaintAction> RecordPaintActionAsync(PaintAction paintAction);
        Task<List<Player>> GetRoomPlayersAsync(string roomId);
        Task<Player?> GetPlayerAsync(string playerId);
        Task<bool> UpdatePlayerAreaAsync(string playerId, int area);
        Task<List<GameRoom>> GetActiveRoomsAsync();
        Task<bool> DeleteRoomAsync(string roomId);
        Task<GameResult> CalculateGameResultAsync(string roomId);
        
        // 新增方法
        Task<GameRoom> CreateRoomAsync(string creatorId, string roomName, int maxPlayers, int gameDuration);
        Task<bool> JoinRoomAsync(string roomId, string playerId);
        Task<bool> StartGameAsync(string roomId, string userId);
        Task<bool> EndGameAsync(string roomId, string userId);
        Task<List<RoomLeaderboardEntry>> GetRoomLeaderboardAsync(string roomId);
    }
}
